package org.grow.mybatisgo.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.grow.mybatisgo.entity.QueryCondition;
import org.grow.mybatisgo.entity.StudentScore;

import java.util.List;

//@Mapper
public interface StudentScoreDao extends BaseMapper<StudentScore> {
    List<StudentScore> dynamicQuery(@Param("qc") QueryCondition queryCondition);

    IPage<StudentScore> dynamicQueryPaged(IPage<StudentScore> page, @Param("qc") QueryCondition queryCondition);

    List<StudentScore> dynamicQueryPartOne(@Param("qc") QueryCondition queryCondition,
                                           @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    Integer dynamicQueryPartTwo(@Param("qc") QueryCondition queryCondition);

    StudentScore findByName(@Param("name") String name);

    int updateScoreByName(@Param("onlineScore") Float onlineScore ,@Param("name") String name);
}